# Maintainer: Caleb Connolly <caleb@connolly.tech>
pkgname=buffyboard
pkgver=3.2.0
pkgrel=0
_lvgl_commit="ceadda8a468b7d5fa6ba973bd82cf610166278d8"
pkgdesc="Touch-enabled framebuffer keyboard (not only) for vampire slayers"
url="https://gitlab.com/postmarketOS/buffybox/buffyboard"
arch="all"
license="GPL-3.0-or-later"
source="https://gitlab.com/postmarketOS/buffybox/-/archive/$pkgver/buffybox-$pkgver.tar.gz
	https://github.com/lvgl/lvgl/archive/$_lvgl_commit.tar.gz"
makedepends="meson libinput-dev libxkbcommon-dev linux-headers eudev-dev inih-dev"
builddir="$srcdir/buffybox-$pkgver"

prepare() {
	default_prepare

	mkdir -p "$builddir"/lvgl
	mv "$srcdir"/lvgl-$_lvgl_commit/* "$builddir"/lvgl
}

build() {
	cd buffyboard
	abuild-meson . output
	meson compile -C output
}

check() {
	cd buffyboard
	meson test --no-rebuild -C output
}

package() {
	cd buffyboard
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
83d6724750e6f7e048063863e78251d32a23b1c7aa9e3529a0b176c415bda70c91b83924f6a71cc7f5ca29f019e7a974b406f6e83ff038dae92430b53183d5fa  buffybox-3.2.0.tar.gz
d3611fe9d55ed105d9567b6019dc49fc0510ac4ed6ca6e15ba0c1bae47f2833d8784b3e008a4dec76dce55bf3809531d07c62e4ba24bafad69c6c54fdd0b70c0  ceadda8a468b7d5fa6ba973bd82cf610166278d8.tar.gz
"
